home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 June / PCpro_2006_06.ISO / files / mstools / WM Components 2.0.2.dmg / Flip4Mac WMV.mpkg / Contents / Resources / preflight < prev    next >
Encoding:
Text File  |  2006-02-21  |  2.3 KB  |  68 lines

  1. #!/bin/sh
  2.  
  3. # remove historical files
  4.  
  5. userGuide="Flip4Mac WMV Player User Guide.pdf"
  6. /bin/rm ~/Desktop/"$userGuide"
  7.  
  8. prefPaneNameOnDesktop="Flip4Mac WMV Registration"
  9. /bin/rm ~/Desktop/"$prefPaneNameOnDesktop"
  10.  
  11. preferencesPath="/Library/Preferences"
  12.  
  13. internetPluginsPath="/Library/Internet Plug-Ins"
  14. windozeMediaPluginName="Windows Media Plugin"
  15. disabledFolderName="Disabled Plug-Ins"
  16. appFolderPath="/Applications/Flip4Mac"
  17.  
  18. /bin/rm -rf /Applications/WMV\ Player.app/
  19.  
  20. # New application files and registration link
  21.  
  22. /bin/rm -rf "$appFolderPath"/WMV\ Player.app/
  23. /bin/rm "$appFolderPath"/Users\ Guide.rtf
  24. /bin/rm "$appFolderPath"/Flip4Mac\ WMV\ User\ Guide.pdf
  25. /bin/rm "$appFolderPath"/WMV\ Upgrade
  26.  
  27. # Remove QT components
  28.  
  29. /bin/rm -rf /Library/QuickTime/Flip4Mac\ WMV\ Import.component/ 
  30. /bin/rm -rf /Library/QuickTime/Flip4Mac\ WMV\ Export.component/ 
  31.  
  32. # Remove web browser plug-ins
  33.  
  34. /bin/rm -rf "$internetPluginsPath"/Flip4Mac\ WMV\ Plugin.plugin/ 
  35. /bin/rm -rf "$internetPluginsPath"/Flip4Mac\ WMV\ Plugin.webplugin/ 
  36.  
  37. /bin/rm -rf "$internetPluginsPath/$disabledFolderName"/Flip4Mac\ WMV\ Plugin.plugin/ 
  38. /bin/rm -rf "$internetPluginsPath/$disabledFolderName"/Flip4Mac\ WMV\ Plugin.webplugin/ 
  39.  
  40. # move windows media player back into place
  41.  
  42. if [ -d "$internetPluginsPath/$disabledFolderName/$windozeMediaPluginName" ] ; then
  43.     if [ ! -d "$internetPluginsPath/$windozeMediaPluginName" ] ; then
  44.         /bin/mv -f "$internetPluginsPath/$disabledFolderName/$windozeMediaPluginName" "$internetPluginsPath/"
  45.     fi
  46. fi
  47.  
  48. # remove the disabled plug-ins folder if it is empty
  49. /bin/rm "$internetPluginsPath/$disabledFolderName/.DS_Store"
  50. /bin/rmdir "$internetPluginsPath/$disabledFolderName"
  51.  
  52. # old prefpane
  53. /bin/rm -rf /Library/PreferencePanes/WmvPlayer.prefPane/ 
  54. # new prefpane
  55. /bin/rm -rf /Library/PreferencePanes/Flip4Mac\ WMV.prefPane/ 
  56.  
  57. # Change mms URLs back to windows media player
  58. /usr/bin/defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerRoleAll</key><string>com.microsoft.mediaplayer</string><key>LSHandlerURLScheme</key><string>mms</string></dict>'
  59.  
  60.  
  61. # Final clean up: remove the uninstaller and app folder
  62. /bin/rm -rf "$appFolderPath"/Flip4Mac\ Uninstaller.pkg/
  63. /bin/rm -rf "$appFolderPath"/Flip4Mac\ WMV\ Uninstaller.pkg/
  64. /bin/rm "$appFolderPath/.DS_Store"
  65. #/bin/rmdir "$appFolderPath"
  66.  
  67. exit 0;
  68.